using System;
using UnityEngine;

namespace CinemaDirector
{
	[Serializable]
	public class Scale
	{
		public enum ScaleType
		{
			LocalValue = 0,
			Current = 1
		}

		public ScaleType scaleType;

		public Vector3 scale;

		[NonSerialized]
		public Vector3 currentLocalScale;

		public void SetLocal(Transform trans)
		{
			scaleType = ScaleType.LocalValue;
			scale = trans.localScale;
		}

		public void SetCurrent(Transform transform)
		{
			currentLocalScale = transform.localScale;
		}

		public Vector3 GetLocalScale(Transform transform)
		{
			if (scaleType == ScaleType.Current)
			{
				return currentLocalScale;
			}
			return scale;
		}
	}
}
